/*
 * @Description: 单位导航包裹组件
 * @Author: Rfan
 * @Date: 2022-02-10 13:40:29
 * @LastEditTime: 2022-05-28 11:12:08
 */

import { Menu } from 'antd';
import { useFlowMgtContext } from '../contexts/FlowMgtContext';
import { arrToTree } from '@/utils';

const NavSidebar = () => {
  const { processTypeFlatList } = useFlowMgtContext();

  const items = arrToTree(
    processTypeFlatList.map((item) => ({
      label: item.name,
      key: item.flowType
    }))
  );

  const handleChange = (id: number, item: any) => {
    // setSelectFond(item);
  };

  return <Menu items={items} />;
};

export default NavSidebar;
